<template>
    <div class="home">
        <p>姓名:{{ name }}</p>
        <p>年龄： {{age}}</p>
        <button @click="changeName">修改名字</button>
    </div>
</template>


<script setup lang="ts" name = "ComPage">
import { ref} from 'vue';
let name = ref( "张三");
let age =  ref(18);
function changeName(){
    name.value +='~';
}
defineExpose({name,age,changeName})
</script>

<style lang="scss" scoped>

</style>